<script>
	import config from 'utils/config.js'
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log(localStorage.getItem('isShow'))
			if (localStorage.getItem('isShow')?JSON.parse(localStorage.getItem('isShow')) :true) {
				uni.showModal({
					title: '提示',
					content: `请关注${config.companyName}公众号查看更多相关内容`,
					showCancel:false,
					confirmText: '关注',
					success: function(res) {
						if (res.confirm) {
							// 退出当前应用，改方法只在App中生效 
							window.location.href = config.wxPublicUrl
							localStorage.setItem('isShow', false)
						} else if (res.cancel) {
							localStorage.setItem('isShow', false)
						}
					}
				});
			}
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
